package singleton;


//饿汉式
public class MyClass {
    private static final MyClass uniqueInstance = new MyClass();

    private MyClass() {
    }

    public static MyClass getInstance() {
        return uniqueInstance;
    }

    String name;
}
